libxl: init: Provide a gc later in libxl_ctx_alloc
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 17 Dec 2013 15:22:40 +0000 (15:22 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 17 Mar 2014 15:53:59 +0000 (15:53 +0000)
commitd1f84a51fa92746bb78d8c4d5a907f03eaf52bbe
tree641de228d2a81cf3c9e45abb92aa1c5c97f00fe2
parent96d1b237ae9b2f2718bb1c59820701f17d3d86e0
libxl: init: Provide a gc later in libxl_ctx_alloc

Provide libxl__gc *gc for the second half of libxl_ctx_alloc.
(For the first half of the function, gc is in scope but set to NULL.)

This makes it possible to make gc-requiring calls.  For example, it
makes error logging more convenient.

Make use of this by changing the logging calls to use the LOG*
convenience macros.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c